﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _0913
{
    class BasisIntProcess
    {
        StringBuilder result = new StringBuilder(100);
        public void eg1()
        {
            int n=0;
            int i, j, k;
            for (i = 1; i <= 4; i++)
            {
                for (j = 1; j <= 4; j++)
                {
                    for (k = 1; k <= 4; k++)
                    {
                        if (i != j && j != k && k != i)
                        {
                            result.Append(i + "" + j + "" + k);
                        }
                    }
                }
            }
            Console.ReadLine();
        }
        /// <summary>
        /// i+100   i+168 
        /// </summary>
        public void eg2()
        {
            int i;
            for (i =0; i <= 10000; i++)
            {
                int n1 = (int)Math.Sqrt(i + 100);
                int n2 = (int)Math.Sqrt(i + 168);
                if(n1 == Math.Sqrt(i + 100) && n2 == Math.Sqrt(i + 168))
                {
                    Console.WriteLine(i);
                }
            }
        }


        public void eg3()
        {
            Console.WriteLine("请输入一个数（n>0）");
            int n = int.Parse(Console.ReadLine());
            int f1 = 0, f2 = 1;
            if (n < 1)
                return;
            Console.Write(f2);
            
            int i=1,temp;
            for (; i < n; i++)
            {
                temp = f1 + f2;
                f1 = f2;
                f2 = temp;
                Console.Write(" " + temp);
            }
        }

        public void eg4()
        {
            int i, j;
            for (i = 1; i <= 9; i++)
            {
                for (j = 1; j <= i; j++)
                {
                    Console.Write(i + "*" + j + "=" + i * j + "  ");
                }
                Console.WriteLine();
            }
        }
    }
}
